﻿using System;
using System.Collections.Generic;
using System.Text;
using BlueLotus7.MetaWeblogUtil.Contract;
using BlueLotus7.MetaWeblogUtil.Contract.Interfaces;
using CookComputing.XmlRpc;

namespace BlueLotus7.MetaWeblogUtil.Sina.Contract.Interfaces
{
    [XmlRpcUrl("http://upload.move.blog.sina.com.cn/blog_rebuild/blog/xmlrpc.php")]
    public interface ISinaBlogMetaWeblogProxy : IXmlRpcProxy
    {
        [XmlRpcMethod(XmlRpcMethodList.metaWeblog_newPost)]
        string NewPost(string blogid, string username, string password, SinaPost post, bool publish);

        [XmlRpcMethod(XmlRpcMethodList.metaWeblog_editPost)]
        bool EditPost(string postid, string username, string password, SinaPost post, bool publish);

        [XmlRpcMethod(XmlRpcMethodList.metaWeblog_getPost)]
        SinaPost GetPost(string postid, string username, string password);

        [XmlRpcMethod(XmlRpcMethodList.metaWeblog_newMediaObject)]
        MediaObjectInfo NewMediaObject(string blogid, string username, string password, MediaObject file);

        [XmlRpcMethod(XmlRpcMethodList.metaWeblog_getCategories)]
        CategoryInfo[] GetCategories(string blogid, string username, string password);
    }
}
